/*
 Navicat Premium Data Transfer

 Source Server         : demo
 Source Server Type    : MySQL
 Source Server Version : 80031
 Source Host           : localhost:3306
 Source Schema         : 2105-house

 Target Server Type    : MySQL
 Target Server Version : 80031
 File Encoding         : 65001

 Date: 05/08/2023 11:50:18
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for house
-- ----------------------------
DROP TABLE IF EXISTS `house`;
CREATE TABLE `house` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '楼盘名称',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '楼盘地址',
  `province_id` int DEFAULT NULL COMMENT '省id',
  `city_id` int DEFAULT NULL COMMENT '市id',
  `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '图片地址',
  `area` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '建筑面积',
  `sms` int DEFAULT NULL COMMENT '是否已发送短信  0否 1是',
  `qu` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_region` (`province_id`,`city_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of house
-- ----------------------------
BEGIN;
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (1, '碧桂园小区', '和平路1号', 1, 4, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '1000', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (2, '保利小区', '健康路1号', 2, 9, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '2000', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (3, '融创小区', '胜利路1号', 3, 13, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '3000', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (4, '绿地小区', '建国路1号', 3, 14, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '3500', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (5, '绿地小区3区', '建国路1号', 3, 15, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '3500', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (6, '绿地小区2区', '建国路1号', 3, 15, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '3500', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (7, '绿地小区4区', '建国路1号', 3, 16, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '3500', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (8, '绿地小区5区', '建国路1号', 3, 16, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '3500', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (9, '绿地小区6区', '建国路1号', 3, 17, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '3500', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (10, '万达小区1号', '晋城高平市', 3, 17, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '200', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (11, 'dddd', 'ddddd', 1, 4, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', '200', NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (12, '123456', '123456', 1, 4, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', NULL, NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (13, '45678', '45678', 2, 10, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', NULL, NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (14, 'efsfdsfds', NULL, 1, 4, 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', NULL, NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (15, '八维', '八维', 1, 6, 'http://localhost:8080/static/fb265dd7-55d2-45e6-9669-11c97605e1a5kung.png', NULL, NULL, NULL);
INSERT INTO `house` (`id`, `name`, `address`, `province_id`, `city_id`, `pic_url`, `area`, `sms`, `qu`) VALUES (16, '八维2', '八维2', 2, 10, 'http://localhost:8080/static/90dc1262-5a2d-4256-aaf1-4a3bc0c23fa3kung.png', NULL, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for region
-- ----------------------------
DROP TABLE IF EXISTS `region`;
CREATE TABLE `region` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '名称',
  `parent_id` int DEFAULT NULL COMMENT '父级id',
  `level` int DEFAULT NULL COMMENT '0 代表省,  1代表市',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of region
-- ----------------------------
BEGIN;
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (1, '河北省', NULL, 0);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (2, '山东省', NULL, 0);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (3, '山西省', NULL, 0);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (4, '廊坊市', 1, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (5, '邢台市', 1, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (6, '唐山市', 1, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (7, '石家庄市', 1, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (8, '邯郸市', 1, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (9, '济南市', 2, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (10, '潍坊市', 2, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (11, '青岛市', 2, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (12, '菏泽市', 2, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (13, '太原市', 3, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (14, '阳泉市', 3, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (15, '吕梁市', 3, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (16, '大同市', 3, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (17, '晋城市', 3, 1);
INSERT INTO `region` (`id`, `name`, `parent_id`, `level`) VALUES (18, '南城区', 17, 2);
COMMIT;

-- ----------------------------
-- Table structure for user_info
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户名,gitee仓库空间名',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `salt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'gitee的昵称',
  `avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'gitee的头像',
  `gitee_id` int DEFAULT NULL COMMENT 'gitee的id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of user_info
-- ----------------------------
BEGIN;
INSERT INTO `user_info` (`id`, `name`, `password`, `salt`, `nick_name`, `avatar_url`, `gitee_id`) VALUES (4, 'admin', '46f94c8de14fb36680850768ff1b7f2a', 'qwe', NULL, NULL, NULL);
INSERT INTO `user_info` (`id`, `name`, `password`, `salt`, `nick_name`, `avatar_url`, `gitee_id`) VALUES (6, 'hccxx', '5e42aaf24ff47ffef2f8978ded472394', 'b2fded23', 'Ikun', 'https://foruda.gitee.com/avatar/1690794549990381566/12065236_hccxx_1690794549.png', 12065236);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
